Combining Monads

نویسندگان

  • David J. King
  • Philip Wadler
چکیده

Monads provide a way of structuring functional programs. Most real applications require a combination of primitive monads. Here we describe how some monads may be combined with others to yield a combined monad.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Iterated distributive laws

We give a framework for combining n monads on the same category via distributive laws satisfying Yang-Baxter equations, extending the classical result of Barr and Wells which combines two monads via one distributive law. We show that this corresponds to iterating n-times the process of taking the 2-category of monads in a 2-category, extending the result of Street characterising distributive la...

متن کامل

Leibniz’s Monads and Mulla Sadra’s Hierarchy of Being: A Comparative Study

Mulla Sadra and Leibniz, the two philosophers from the East and the West, belong to two different worlds. Though they were unaware of the ideas of each other, their philosophical systems share certain common points that are comparable. Monads constitute the basis of Leibniz's thought and he refers to their features in his various works. On the other side, Mulla Sadra's philosophy is also based ...

متن کامل

Monad Combinators, Non-Determinism and Probabilistic Choice

We test Lüth and Ghani’s proposal [11, 12, 13] to use coproducts of monads as a basis for modularity by applying their ideas to Varacca’s work [20] on combining non-determinism and probabilistic choice. In particular, we discuss i) the coproduct of non-determinism and probabilistic choice; ii) how monad compositions based upon distributivity possess a universal property; and iii) Capretta’s [4]...

متن کامل

Layer by layer - Combining Monads

We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence ...

متن کامل

Monad-Independent Hoare Logic in HASCASL

Monads have been recognized by Moggi as an elegant device for dealing with stateful computation in functional programming languages. It is thus natural to develop a Hoare calculus for reasoning about computational monads. While this has previously been done only for the state monad, we here provide a generic, monad-independent approach, which applies also to further computational monads such as...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992